Release 10.1A: OpenEdge Development:
Progress 4GL Reference


GET-DOCUMENT-ELEMENT( ) method

Retrieves the root element of the document. The parameter must be a valid X-noderef handle and will refer to the document’s root element if the method succeeds.

Return type: LOGICAL

Applies to: X-document object handle

Syntax
GET-DOCUMENT-ELEMENT( x-node-handle ) 

x-node-handle

A valid X-noderef handle to use for the root element.

The following example demonstrates the use of GET-DOCUMENT-ELEMENT if hDoc is an X-document and hRoot is an X-noderef:

/* Creates a 4GL document object & initializes the associated XML object. */
CREATE X-document hDoc.

/* Creates a 4GL reference for an XML node in a parse tree. */
CREATE X-NODEREF hRoot.

/* Reads the myxml.xml document into an XML parse tree. */
hDoc:LOAD("file","myxml.xml",false).

/* Associates hRoot with the root node of the hDoc document. */
hDoc:GET-DOCUMENT-ELEMENT(hRoot). 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095